import Cookies from "js-cookie";

const TokenKey = "Screen-Token";
const TokenKey1 = "API";
const TokenKey2 = "UserId";

export function getToken() {
  return Cookies.get(TokenKey);
}

export function getPortToken() {
  return Cookies.get(TokenKey1);
}

export function getUserId() {
  return Cookies.get(TokenKey2);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function setPortToken(portToken) {
  return Cookies.set(TokenKey1, portToken);
}

export function setUserId(token) {
  return Cookies.set(TokenKey2, token);
}

export function removeToken() {
  localStorage.removeItem("token");
  localStorage.removeItem("setCrossData");
  return Cookies.remove(TokenKey);
}
